<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorate="layout">
<head>
<title>清单管理</title>
</head>
<body>
	<div layout:fragment="header">
		<div class="title_left">
			<h3>清单查询</h3>
		</div>
		<div class="title_right">
			<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
				<form th:action="@{/invts}">
					<div class="input-group">
						<input type="text" class="form-control" name="searchText" placeholder="输入关键字...">
						<span class="input-group-btn">
							<button class="btn btn-default">搜索</button>
						</span>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div layout:fragment="content">
		<script type="text/javascript">
            var ctx = [[@{/}]];
			function comparisonDelivery(logisticsCode, logisticsNo, copNo, headGuid) {
				$.getJSON(ctx + "/deliveries/comparisonDeliveryByLogisticsNo?logisticsCode=" + logisticsCode +
					"&logisticsNo=" + logisticsNo + "&headGuid=" + headGuid, function(data) {
					$("#appStatusModal").modal("show");
					$("#appStatusModal .modal-title").text("入库比对结果[" + copNo + "-" + logisticsCode + ":" +
						logisticsNo + "]");
					var isPass = false;
					var dataHtml = "<table class='table table-striped jambo_table bulk_action'>";
					dataHtml += "<thead><th>表头序号</th><th>企业内部编号</th><th>航班航次号</th><th>总（提）运单号</th><th>运输方式</th>";
					dataHtml += "<th>运输工具</th><th>比对结果</th></thead>";
					dataHtml += "<tbody>";
					if (null != data) {
						if (0 == data.length) {
							$("#appStatusModal .modal-body").html("没有对应的入库明细单");
						} else {
							for (var i = 0; i < data.length; i++) {
								if (0 == i) {
									dataHtml += "<tr style='background-color: yellow;'>";
									dataHtml += "<td>" + data[i].invtHeadGuid + "</td>";
									dataHtml += "<td>" + copNo + "</td>";
									dataHtml += "<td>" + data[i].invtVoyageNo + "</td>";
									dataHtml += "<td>" + data[i].invtBillNo + "</td>";
									dataHtml += "<td>" + data[i].invtTrafMode + "</td>";
									dataHtml += "<td>" + data[i].invtTrafNo + "</td>";
									dataHtml += "<td>清单信息</td>";
									dataHtml += "</tr>";
								}
								dataHtml += "<tr>";
								dataHtml += "<td>" + data[i].deliveryHeadGuid + "</td>";
								dataHtml += "<td>" + data[i].copNo + "</td>";
								dataHtml += "<td>" + data[i].deliveryVoyageNo + "</td>";
								dataHtml += "<td>" + data[i].deliveryBillNo + "</td>";
								dataHtml += "<td>" + data[i].deliveryTrafMode + "</td>";
								dataHtml += "<td>" + data[i].deliveryTrafNo + "</td>";
								isPass = false;
								if (data[i].deliveryVoyageNo == data[i].invtVoyageNo &&
									data[i].deliveryBillNo == data[i].invtBillNo &&
									data[i].deliveryTrafMode == data[i].invtTrafMode &&
									data[i].deliveryTrafNo == data[i].invtTrafNo) {
									isPass = true;
								}
								dataHtml += "<td>" + (isPass ? "<b style='color:#5cb85c;'><i>通过</i></b>" : "<b style='color:red;'><i>不通过</i></b>") + "</td>";
								dataHtml += "</tr>";
							}
							dataHtml += "</tbody></table>";
							$("#appStatusModal .modal-body").html(dataHtml);
						}
					}
				})
			}
			
			function getCiqStatusByCopNo(ebcCode, orderNo, logisticsCode, logisticsNo, status) {
				$.getJSON(ctx + "/invts/getImpInvtHeadListByOrderNoLogisticsNo?ebcCode=" + ebcCode +
					"&orderNo=" + orderNo + "&logisticsCode=" + logisticsCode + "&logisticsNo=" + logisticsNo, function(data) {
					$("#appStatusModal").modal("show");
					$("#appStatusModal .modal-title").text("国检状态[" + orderNo + ":" + logisticsNo + "]");
					var dataHtml = "<table class='table table-striped jambo_table bulk_action'>";
					dataHtml += "<thead><th>支付编号</th><th>支付企业名称</th><th>国检状态</th><th>审批意见</th>";
					dataHtml += "<th>审批时间</th></thead>";
					dataHtml += "<tbody>";
					if (null != data) {
						for(var i = 0; i < data.length; i++) {
				
							if (null != data) {
								for (var i = 0; i < data.length; i++) {
									dataHtml += "<tr>";
									dataHtml += "<td>" + data[i].applyCode + "</td>"
									dataHtml += "<td title='" + data[i].payCode +"'>" + data[i].payName + "</td>";
									if (undefined != data[i].auditState && null != data[i].auditState) {
										dataHtml += "<td>" + status[data[i].auditState] + "[" + data[i].auditState + "]" + "</td>";
									} else {
										dataHtml += "<td></td>";
									}
									dataHtml += "<td>" + data[i].bwName + "</td>";
									dataHtml += "<td>" + data[i].applyDate + "</td>";
									dataHtml += "</tr>";
								}
							}
						}
					}
					dataHtml += "</tbody>";
					dataHtml += "</table>";
					
					$("#appStatusModal .modal-body").html(dataHtml);
				});
			}
			
			function getPubRtnListByBizGuid(copNo, bizGuid, status) {
				$.getJSON(ctx + "/invts/getPubRtnListByBizGuid/" + bizGuid, function(data) {
					$("#appStatusModal").modal("show");
					$("#appStatusModal .modal-title").text("历史状态[" + copNo + "]");
					var dataHtml = "<table class='table table-striped jambo_table bulk_action'>";
					dataHtml += "<thead><tr><th>入库时间</th><th>报文时间</th><th>业务状态</th><th>业务信息</th></thead>";
					dataHtml += "<tbody>";
					if (null != data) {
						for (var i = 0; i < data.length; i++) {
							dataHtml += "<tr>";
							dataHtml += "<td>" + data[i].sysDate + "</td>";
							dataHtml += "<td>" + data[i].rtnTime + "</td>";
							dataHtml += "<td>" + status[data[i].rtnStatus] + "[" + data[i].rtnStatus + "]</td>";
							dataHtml += "<td>" + data[i].rtnInfo + "</td>";
							dataHtml += "</tr>";
						}
					}
					dataHtml += "</tbody>";
					dataHtml += "</table>";
					
					$("#appStatusModal .modal-body").html(dataHtml);
				});
			}
			
			function getDistHeadByInvtNo(invtNo, status) {
				$.getJSON(ctx + "/invts/getDistHeadByInvtNo/" + invtNo, function(data) {
					$("#appStatusModal").modal("show");
					$("#appStatusModal .modal-title").text("核放单信息[" + invtNo + "]");
					var dataHtml = "<table class='table table-striped jambo_table bulk_action'>";
					dataHtml += "<thead><tr><th>核放单号</th><th>海关编码</th><th>申报企业</th><th>核放单状态</th></thead>";
					dataHtml += "<tbody>";
					if (null != data) {
						dataHtml += "<tr>";
						dataHtml += "<td>" + data.distNo + "</td>";
						dataHtml += "<td>" + data.customsCode + "</td>";
						dataHtml += "<td title='" + data.declCode + "'>" + data.declName + "</td>";
						dataHtml += "<td>" + data.distStat + "</td>";
						dataHtml += "</tr>";
					}
					dataHtml += "</tbody>";
					dataHtml += "<thead><tr><th>录入日期</th><th>申报日期</th><th>退单原因</th><th>备注</th></thead>";
					dataHtml += "<tbody>";
					if (null != data) {
						dataHtml += "<tr>";
						dataHtml += "<td>" + data.inputDate + "</td>";
						dataHtml += "<td>" + data.declDate + "</td>";
						dataHtml += "<td>" + data.returnReason + "</td>";
						dataHtml += "<td>" + data.note + "</td>";
						dataHtml += "</tr>";
					}
					dataHtml += "</tbody>";
					dataHtml += "</table>";
					
					$("#appStatusModal .modal-body").html(dataHtml);
				});
			}

			function reissueInvt(invtNo) {
			    $.get(ctx + "/reissue", {"invtNo": invtNo});
			}

			function exportInvts() {
				var formObj = $("#invt_form")
				window.open(ctx + "/invts/export?" + formObj.serialize());
			}
		</script>

		<div id="appStatusModal" class="modal fade bs-example-modal-sm" tabindex="-1"
			role="dialog" aria-labelledby="mySmallModalLabel">
			<div class="modal-dialog modal-lg" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
						</button>
						<h4 class="modal-title">历史状态</h4>
					</div>
					<div class="modal-body"></div>
				</div>
			</div>
		</div>
		
		<div class="col-md-12 col-sm-12 col-xs-12">
			<div class="x_panel">
				<div class="x_title">
					<h2>
						搜索条件
						<button class="btn btn-round btn-info" onclick="exportInvts()">导出</button>
					</h2>
					<ul class="nav navbar-right panel_toolbox">
						<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
							<ul class="dropdown-menu" role="menu">
								<li><a href="#">Settings 1</a>
								</li>
								<li><a href="#">Settings 2</a>
								</li>
							</ul>
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
				<div class="x_content">
					<form class="form-horizontal search-form" role="form" th:action="@{/invts}" method="GET"
							id="invt_form">
						<input type="hidden" name="pageSize" th:value="${invtHead.pageSize}" />
						<input class="page-num" type="hidden" name="pageNum" th:value="${invtHead.pageNum}" />
						<div class="form-group">
							<label class="col-sm-1 control-label">电商代码</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="ebcCode" placeholder="电商代码"
										th:value="${invtHead.ebcCode}" />
							</div>
							<label class="col-sm-1 control-label">电商名称</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="ebcName" placeholder="电商名称"
										th:value="${invtHead.ebcName}" />
							</div>
							<label class="col-sm-1 control-label">报关企业代码</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="agentCode" placeholder="申报企业代码"
										th:value="${invtHead.agentCode}" />
							</div>
							<label class="col-sm-1 control-label">报关企业名称</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="agentName" placeholder="申报企业名称"
										th:value="${invtHead.agentName}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">物流企业代码</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="logisticsCode" placeholder="物流企业代码"
										th:value="${invtHead.logisticsCode}" />
							</div>
							<label class="col-sm-1 control-label">物流企业名称</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="logisticsName" placeholder="物流企业名称"
										th:value="${invtHead.logisticsName}" />
							</div>
							<label class="col-sm-1 control-label">区内企业代码</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="areaCode" placeholder="区内企业代码"
										th:value="${invtHead.areaCode}" />
							</div>
							<label class="col-sm-1 control-label">区内企业名称</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="areaName" placeholder="区内企业名称"
										th:value="${invtHead.areaName}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">清单号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="invtNo" placeholder="清单号"
										th:value="${invtHead.invtNo}" />
							</div>
							<label class="col-sm-1 control-label">订单号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="orderNo" placeholder="订单号"
										th:value="${invtHead.orderNo}" />
							</div>
							<label class="col-sm-1 control-label">运单号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="logisticsNo" placeholder="运单号"
										th:value="${invtHead.logisticsNo}" />
							</div>
							<label class="col-sm-1 control-label">内部编号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="copNo" placeholder="内部编号"
										th:value="${invtHead.copNo}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">清单状态</label>
							<div class="col-sm-2">
								<select class="form-control" name="appStatus">
									<option th:each="appStat : ${appStatus}" th:value="${appStat.key}"
											th:text="${appStat.key} + '-' + ${appStat.value}"
											th:selected="${appStat.key == invtHead.appStatus} ? 'selected'"></option>
								</select>
							</div>
							<label class="col-sm-1 control-label">出区状态</label>
							<div class="col-sm-2">
								<select class="form-control" name="distStatus">
									<option th:each="distStat : ${distStatus}" th:value="${distStat.key}"
											th:text="${distStat.key} + '-' + ${distStat.value}"
											th:selected="${distStat.key == invtHead.distStatus} ? 'selected'"></option>
								</select>
							</div>
							<label class="col-sm-1 control-label">申报开始时间</label>
							<div class="col-sm-2">
								<div class='input-group date input-date'>
									<input type='text' class="form-control" name="beginAppTime"
											th:value="${invtHead.beginAppTime}" placeholder="申报开始时间" />
									<span class="input-group-addon">
										<span class="glyphicon glyphicon-time"></span>
									</span>
								</div>
							</div>
							<label class="col-sm-1 control-label">申报结束时间</label>
							<div class="col-sm-2">
								<div class='input-group date input-date'>
									<input type='text' class="form-control" name="endAppTime"
											th:value="${invtHead.endAppTime}" placeholder="申报结束时间" />
									<span class="input-group-addon">
										<span class="glyphicon glyphicon-time"></span>
									</span>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">申报状态</label>
							<div class="col-sm-2">
								<select class="form-control" name="declareStatus">
									<option th:each="declareStat : ${declareStatus}" th:value="${declareStat.key}"
											th:text="${declareStat.key} + '-' + ${declareStat.value}"
											th:selected="${declareStat.key == invtHead.declareStatus} ? 'selected'"></option>
								</select>
							</div>
							<label class="col-sm-1 control-label">申报关区</label>
							<div class="col-sm-2">
								<select class="form-control" name="customsCode">
									<option th:each="customsCodeEntry : ${customsCodeMap}" th:value="${customsCodeEntry.key}"
											th:text="${customsCodeEntry.key} + '-' + ${customsCodeEntry.value}"
											th:selected="${customsCodeEntry.key == invtHead.customsCode} ? 'selected'"></option>
								</select>
							</div>
							<label class="col-sm-1 control-label">是否去重复</label>
							<div class="col-sm-2">
								<select class="form-control" name="distinct">
									<option th:each="distinctEntry : ${distinctMap}" th:value="${distinctEntry.key}"
											th:text="${distinctEntry.key} + '-' + ${distinctEntry.value}"
											th:selected="${distinctEntry.key == invtHead.distinct} ? 'selected'"></option>
								</select>
							</div>
							<label class="col-sm-1 control-label">贸易方式</label>
							<div class="col-sm-2">
								<select class="form-control" name="tradeMode">
									<option th:each="tradeModeEntry : ${tradeModeMap}" th:value="${tradeModeEntry.key}"
											th:text="${tradeModeEntry.key} + '-' + ${tradeModeEntry.value}"
											th:selected="${tradeModeEntry.key == invtHead.tradeMode} ? 'selected'"></option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">支付单号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="applyCode" placeholder="支付单号"
										th:value="${invtHead.applyCode}" />
							</div>
							<label class="col-sm-1 control-label">申报日期</label>
							<div class="col-sm-2">
								<div class='input-group date input-date'>
									<input type='text' class="form-control" name="sysDateStr"
											th:value="${invtHead.sysDateStr}" placeholder="申报日期" />
									<span class="input-group-addon">
										<span class="glyphicon glyphicon-time"></span>
									</span>
								</div>
							</div>
							<label class="col-sm-1 control-label">提运单号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="billNo" placeholder="提运单号"
										th:value="${invtHead.billNo}" />
							</div>
							<label class="col-sm-1 control-label">航班航次号</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="voyageNo" placeholder="航班航次号"
										th:value="${invtHead.voyageNo}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label">订购人电话</label>
							<div class="col-sm-2">
								<input class="form-control" type="text" name="buyerTelephone" placeholder="订购人电话"
										th:value="${invtHead.buyerTelephone}" />
							</div>
							<span th:replace="~{issue :: condition-text('身份证号', 'buyerIdNumber', ${invtHead.buyerIdNumber}) }"></span>
							<span th:replace="~{issue :: condition-text('核放单号', 'distNo', ${invtHead.distNo}) }"></span>
                            <span th:replace="~{issue :: condition-map('海关状态', 'cusStatus', ${invtHead.cusStatus}, ${cusStatus}) }"></span>
						</div>
						<div class="pull-right form-group no-margin-right">
							<button type="button" class="btn btn-round btn-info btn-lg" onclick="formSubmit(this);">搜索</button>
							<button type="button" class="btn btn-round btn-warning btn-lg" onclick="resetForm('invt_form')">重置</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<div class="col-md-12 col-sm-12 col-xs-12">
			<div class="x_panel">
				<div class="x_content" style="display: block; text-align: center;">
					<button type="button" class="btn btn-round btn-dark"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'\')'">全部</button>
					<button type="button" class="btn btn-round btn-success"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'800\')'">放行</button>
					<button type="button" class="btn btn-round btn-warning"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'400\')'">待运抵</button>
					<button type="button" class="btn btn-round btn-warning"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'500\')'">查验</button>
					<button type="button" class="btn btn-round btn-warning"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'100\')'">退单</button>
					<button type="button" class="btn btn-round btn-info"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'300\')'">人工审核</button>
					<button type="button" class="btn btn-round btn-info"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'120\')'">海关入库</button>
					<button type="button" class="btn btn-round btn-warning"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'700\')'">退运</button>
					<button type="button" class="btn btn-round btn-danger"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'05\')'">电子口岸校验失败</button>
					<button type="button" class="btn btn-round btn-danger"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'-621001\')'">清单校验失败</button>
					<button type="button" class="btn btn-round btn-success"
						th:onclick="'addFormParaQuery(\'invt_form\', \'appStatus\', \'899\')'">结关</button>
				</div>
			</div>
		</div>

		<div class="col-md-12 col-sm-12 col-xs-12">
			<ul class="pagination pagination-lg pull-right">
				<li><a>共<span th:text="${pageInfo.total}" class="red">1</span>条</a></li>
				<li th:class="${0 == pageInfo.pages} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${0 < pageInfo.pages} ? 'goToPageNum(\'invt_form\', 1);'">首页</a>
				</li>
				<li th:class="${pageInfo.isFirstPage} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${!pageInfo.isFirstPage} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.prePage} + ');'">上页</a>
				</li>
				<li th:each="page : ${pageList}"
						th:class="${page == pageInfo.pageNum} ? 'active'">
					<a href="javascript:void(0)" th:text="${page}"
							th:onclick="'goToPageNum(\'invt_form\',' + ${page} + ');'"></a>
				</li>
				<li th:class="${pageInfo.isLastPage} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${!pageInfo.isLastPage} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.nextPage} + ');'">下页</a>
				</li>
				<li th:class="${0 == pageInfo.pages} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${0 < pageInfo.pages} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.pages} + ');'">尾页</a>
				</li>
				<li><a th:text="'第' + ${pageInfo.pageNum} + '页'">第1页</a></li>
				<li><a th:text="'共' + ${pageInfo.pages} + '页'">共1页</a></li>
				<li><input type="number" class="input-lg change-page-num" style="width:100px;"  th:value="${pageInfo.pageNum}" /></li>
				<li><button  class="btn-lg btn btn-info" type="button" th:onclick="'goToPageNum(\'invt_form\', $(\'.change-page-num\').val(), ' + ${pageInfo.pages} + ')'">跳转</button></li>
				<li>
					<select title="显示条数" class="input-lg" style="width:60px;" onchange="changePageSize('invt_form', this.value);">
						<option th:each="pageSize : ${pageSizeList}" th:text="${pageSize}"
								th:value="${pageSize}" th:selected="${pageSize == pageInfo.pageSize} ? 'selected'"></option>
					</select>
				</li>
			</ul>
			<table class="table table-striped jambo_table bulk_action">
				<thead>
					<tr class="headings">
						<th class="column-title">序号</th>
						<th class="column-title">清单号</th>
						<th class="column-title">内部编号</th>
						<th class="column-title">报关企业</th>
						<th class="column-title">电商企业</th>
						<th class="column-title">订单号</th>
						<th class="column-title">物流企业</th>
						<th class="column-title">运单号</th>
						<th class="column-title">身份证号</th>
						<th class="column-title">申报日期</th>
						<th class="column-title">关区</th>
						<th class="column-title">清单状态</th>
						<th class="column-title">海关状态</th>
						<th class="column-title">出区状态</th>
						<th class="column-title">比对入库明细单</th>
						<th class="column-title">补发此清单</th>
					</tr>
				</thead>
				<tbody>
					<tr th:if="${invtHeadList.empty}">
						<td colspan="30">没有数据</td>
					</tr>
					<tr th:each="invtHead,stat : ${invtHeadList}" th:class="${0 == stat.count % 2} ? 'odd pointer' : 'even pointer'">
						<td th:text="${stat.count}"></td>
						<td>
							<a th:text="${invtHead.invtNo}"
								th:href="@{'/invts/' + ${invtHead.headGuid}}"></a>
						</td>
						<td>
							<a th:text="${invtHead.copNo}"
								th:href="@{'/invts/' + ${invtHead.headGuid}}"></a>
						</td>
						
						<td th:title="${invtHead.agentCode}">
							<a href="javascript:void(0)" th:text="${invtHead.agentName}"
								th:onclick="'addFormParaQuery(\'invt_form\', \'agentCode\', \'' + ${invtHead.agentCode} + '\')'"></a>
						</td>
						<td th:title="${invtHead.ebcCode}">
							<a href="javascript:void(0)" th:text="${invtHead.ebcName}"
								th:onclick="'addFormParaQuery(\'invt_form\', \'ebcCode\', \'' + ${invtHead.ebcCode} + '\')'"></a>
						</td>
						<td>
							<a th:text="${invtHead.orderNo}"
								th:href="@{'/orders?orderNo=' + ${invtHead.orderNo}}"></a>
						</td>
						<td th:title="${invtHead.logisticsCode}">
							<a href="javascript:void(0)" th:text="${invtHead.logisticsName}"
								th:onclick="'addFormParaQuery(\'invt_form\', \'logisticsCode\', \'' + ${invtHead.logisticsCode} + '\')'"></a>
						</td>
						<td>
							<a th:text="${invtHead.logisticsNo}"
								th:href="@{'/logistics?logisticsNo=' + ${invtHead.logisticsNo}}"></a>
						</td>
                        <td th:title="${invtHead.buyerName}">
							<a th:text="${invtHead.buyerIdNumber}"
								th:href="@{'/persons?certId=' + ${invtHead.buyerIdNumber}}"></a>
						</td>
						<td th:text="${#calendars.format(invtHead.sysDate, 'YYYY-MM-dd HH:mm:ss')}"></td>
						<td th:text="${customsCodeMap[invtHead.customsCode]}" th:title="${invtHead.customsCode}"></td>
						<td th:switch="${invtHead.appStatus}" th:onclick="'getPubRtnListByBizGuid(\'' + ${invtHead.copNo} + '\',\'' + ${invtHead.headGuid} + '\', ' + ${appStatusJson} + ')'"
							title="点击查看历史状态">
							<span th:case="05" class="btn btn-round btn-danger btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="04" class="btn btn-round btn-danger btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="4" class="btn btn-round btn-danger btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="500" class="btn btn-round btn-warning btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="100" class="btn btn-round btn-warning btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="700" class="btn btn-round btn-warning btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="400" class="btn btn-round btn-warning btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="800" class="btn btn-success btn-round btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="899" class="btn btn-round btn-success btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="3" class="btn btn-round btn-success btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="03" class="btn btn-round btn-success btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
							<span th:case="*" class="btn btn-round btn-info btn-xs" th:text="${appStatus[invtHead.appStatus]}"></span>
						</td>
						<td th:switch="${invtHead.cusStatus}">
							<span th:case="24" class="btn btn-round btn-warning btn-xs" th:text="${cusStatus[invtHead.cusStatus]}"></span>
							<span th:case="13" class="btn btn-round btn-warning btn-xs" th:text="${cusStatus[invtHead.cusStatus]}"></span>
							<span th:case="23" class="btn btn-round btn-warning btn-xs" th:text="${cusStatus[invtHead.cusStatus]}"></span>
							<span th:case="26" class="btn btn-success btn-round btn-xs" th:text="${cusStatus[invtHead.cusStatus]}"></span>
							<span th:case="*" class="btn btn-round btn-info btn-xs" th:text="${cusStatus[invtHead.cusStatus]}"></span>
						</td>
						<td th:switch="${invtHead.distStatus}" th:onclick="'getDistHeadByInvtNo(\'' + ${invtHead.invtNo} + '\', ' + ${appStatusJson} + ')'"
							title="点击查看所绑的核放单信息">
							<span th:case="1" class="btn btn-round btn-danger btn-xs" th:text="${distStatus[invtHead.distStatus]}"></span>
							<span th:case="2" class="btn btn-round btn-warning btn-xs" th:text="${distStatus[invtHead.distStatus]}"></span>
							<span th:case="8" class="btn btn-round btn-success btn-xs" th:text="${distStatus[invtHead.distStatus]}"></span>
							<span th:case="*" class="btn btn-round btn-info btn-xs" th:text="${distStatus[invtHead.distStatus]}"></span>
						</td>
						<td><button th:disabled="${'9610' != invtHead.tradeMode}" class="btn btn-info btn-xs" th:onclick="'comparisonDelivery(\'' + ${invtHead.logisticsCode} + '\',\'' + ${invtHead.logisticsNo} + '\',\'' + ${invtHead.copNo} + '\',\'' + ${invtHead.headGuid} + '\')'">比对</button></td>
						<td><button class="btn btn-info btn-xs" th:onclick="'reissueInvt(\'' + ${invtHead.invtNo} + '\')'">补发</button></td>
					</tr>
				</tbody>
				<tfoot>
					<tr class="headings">
						<th class="column-title">序号</th>
						<th class="column-title">清单号</th>
						<th class="column-title">内部编号</th>
						<th class="column-title">报关企业</th>
						<th class="column-title">电商企业</th>
						<th class="column-title">订单号</th>
						<th class="column-title">物流企业</th>
						<th class="column-title">运单号</th>
						<th class="column-title">身份证号</th>
						<th class="column-title">申报日期</th>
						<th class="column-title">关区</th>
						<th class="column-title">清单状态</th>
						<th class="column-title">海关状态</th>
						<th class="column-title">出区状态</th>
						<th class="column-title">比对入库明细单</th>
						<th class="column-title">补发此清单</th>
					</tr>
				</tfoot>
			</table>
			<ul class="pagination pagination-lg pull-right">
				<li><a>共<span th:text="${pageInfo.total}" class="red">1</span>条</a></li>
				<li th:class="${0 == pageInfo.pages} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${0 < pageInfo.pages} ? 'goToPageNum(\'invt_form\', 1);'">首页</a>
				</li>
				<li th:class="${pageInfo.isFirstPage} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${!pageInfo.isFirstPage} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.prePage} + ');'">上页</a>
				</li>
				<li th:each="page : ${pageList}"
						th:class="${page == pageInfo.pageNum} ? 'active'">
					<a href="javascript:void(0)" th:text="${page}"
							th:onclick="'goToPageNum(\'invt_form\',' + ${page} + ');'"></a>
				</li>
				<li th:class="${pageInfo.isLastPage} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${!pageInfo.isLastPage} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.nextPage} + ');'">下页</a>
				</li>
				<li th:class="${0 == pageInfo.pages} ? 'disabled'">
					<a href="javascript:void(0)"
							th:onclick="${0 < pageInfo.pages} ? 'goToPageNum(\'invt_form\', ' + ${pageInfo.pages} + ');'">尾页</a>
				</li>
				<li><a th:text="'第' + ${pageInfo.pageNum} + '页'">第1页</a></li>
				<li><a th:text="'共' + ${pageInfo.pages} + '页'">共1页</a></li>
				<li><input type="number" class="input-lg change-page-num-down" style="width:100px;"  th:value="${pageInfo.pageNum}" /></li>
				<li><button  class="btn-lg btn btn-info" type="button" th:onclick="'goToPageNum(\'invt_form\', $(\'.change-page-num-down\').val(), ' + ${pageInfo.pages} + ')'">跳转</button></li>
				<li>
					<select title="显示条数" class="input-lg" style="width:60px;" onchange="changePageSize('invt_form', this.value);">
						<option th:each="pageSize : ${pageSizeList}" th:text="${pageSize}"
								th:value="${pageSize}" th:selected="${pageSize == pageInfo.pageSize} ? 'selected'"></option>
					</select>
				</li>
			</ul>
		</div>
	</div>
</body>
</html>
